Skip to content

feat: GitHub and Linear connectors (#85, #101)#142

Merged
michaelmcnees merged 2 commits into
mainfrom
feat/github-linear-connectors
May 30, 2026
Merged

feat: GitHub and Linear connectors (#85, #101)#142
michaelmcnees merged 2 commits into
mainfrom
feat/github-linear-connectors

Conversation

@michaelmcnees

Copy link
Copy Markdown
Collaborator

Summary

Adds four new built-in connectors — two for GitHub (REST) and two for Linear (GraphQL).

GitHub (_credential: {token: "ghp_..."})

  • github/create_issue — creates an issue in any repo. Params: owner, repo, title; optional body, labels, assignees. Returns number, url, node_id, state.
  • github/dispatch — fires a repository_dispatch event. Params: owner, repo, event_type; optional client_payload. Returns {ok: true}.

Linear (_credential: {token: "lin_api_..."})

  • linear/create_issue — creates an issue via GraphQL IssueCreate. Params: team_id, title; optional description, assignee_id, project_id, priority (0–4), label_ids. Returns id, identifier, url, title.
  • linear/search — queries issues via GraphQL with optional query (title contains), team_id, assignee_id, state filters and configurable limit (default 25). Returns issues array and count.

All connectors follow the established _credential pattern (deleted from params after extraction), use httptest servers in unit tests, and are registered in NewRegistry.

Test plan

  • go test ./internal/connector/ -run "TestGitHub|TestLinear" — 21 tests all pass
  • go build ./... and go vet ./... pass clean
  • Registry resolves github/create_issue, github/dispatch, linear/create_issue, linear/search

🤖 Generated with Claude Code

github/create_issue — POST /repos/{owner}/{repo}/issues with title, body,
labels, and assignees. Returns number, url, node_id, state.

github/dispatch — POST /repos/{owner}/{repo}/dispatches for repository_dispatch
events with optional client_payload.

linear/create_issue — GraphQL IssueCreate mutation with team_id, title,
description, assignee_id, project_id, priority, and label_ids. Returns id,
identifier, url, title.

linear/search — GraphQL Issues query with optional title/team/assignee/state
filters and configurable limit (default 25). Returns issues array and count.

All four connectors follow the _credential/token pattern, delete the credential
key from params after extraction, use httptest servers in tests, and are
registered in NewRegistry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@michaelmcnees, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 18 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5475c767-fb23-4930-8aa2-ea9cc8f3ec38

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd8cbf and fe1d3b6.

📒 Files selected for processing (5)
  • packages/engine/internal/connector/connector.go
  • packages/engine/internal/connector/github.go
  • packages/engine/internal/connector/github_test.go
  • packages/engine/internal/connector/linear.go
  • packages/engine/internal/connector/linear_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/github-linear-connectors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-party GitHub (REST) and Linear (GraphQL) connectors to the engine’s built-in connector registry, along with unit tests using httptest servers.

Changes:

  • Introduces github/create_issue and github/dispatch connectors with request/response shaping and credential extraction.
  • Introduces linear/create_issue and linear/search connectors with a shared GraphQL request helper.
  • Registers all four connectors in NewRegistry and adds corresponding unit tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/engine/internal/connector/linear.go Adds Linear GraphQL connectors + shared GraphQL request helper and param extraction helpers.
packages/engine/internal/connector/linear_test.go Adds unit tests for Linear connectors and registry wiring.
packages/engine/internal/connector/github.go Adds GitHub REST connectors + shared HTTP client helper and slice conversion helper.
packages/engine/internal/connector/github_test.go Adds unit tests for GitHub connectors and registry wiring.
packages/engine/internal/connector/connector.go Registers new GitHub and Linear connectors in the built-in registry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/engine/internal/connector/linear.go Outdated
Comment thread packages/engine/internal/connector/linear.go Outdated
Comment thread packages/engine/internal/connector/github.go
Comment thread packages/engine/internal/connector/linear.go Outdated
Comment thread packages/engine/internal/connector/linear.go Outdated
Comment thread packages/engine/internal/connector/github.go
- Validate priority range (0–4) in linear/create_issue; return error early
- Replace duplicate extractIntParam with shared extractInt (handles int64)
- Rename shadowed body var to respBody in github/dispatch error path
- Add TestLinearCreateIssueConnector_InvalidPriority test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@michaelmcnees michaelmcnees merged commit ff2883f into main May 30, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants